import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '所属公司',
    align:"center",
    dataIndex: 'shopId_dictText'
   },
   {
    title: '车型',
    align:"center",
    dataIndex: 'motorcycleType_dictText'
   },
   {
    title: '可坐人数',
    align:"center",
    sorter: true,
    dataIndex: 'seatingCapacity'
   },
   {
    title: '车牌',
    align:"center",
    dataIndex: 'plateNumber'
   },
   {
    title: '司机姓名',
    align:"center",
    dataIndex: 'driverName'
   },
   {
    title: '司机电话',
    align:"center",
    dataIndex: 'driverPhone'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '司机服务等级',
    align:"center",
    dataIndex: 'driverGrade_dictText'
   },
   {
    title: '身份证',
    align:"center",
    dataIndex: 'card'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "所属公司",
      field: 'shopId',
      component: 'JSearchSelect',
      componentProps:{
         dict:"couple_shop,title,id,shop_category=3"
      },
      //colProps: {span: 6},
 	},
	{
      label: "车型",
      field: 'motorcycleType',
      component: 'JDictSelectTag',
      componentProps:{
		  dictCode:"motorcycle_type"
      },
      //colProps: {span: 6},
 	},
	{
	  label: "司机服务等级",
	  field: 'driverGrade',
	  component: 'JDictSelectTag',
	  componentProps:{
		  dictCode:"driver_grade"
	  },
	  //colProps: {span: 6},
	},
	{
      label: "司机姓名",
      field: 'driverName',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "司机电话",
      field: 'driverPhone',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '所属公司',
    field: 'shopId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"couple_shop,title,id,shop_category=3"
    },
  },
  {
    label: '车型',
    field: 'motorcycleType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"motorcycle_type"
     },
  },
  {
    label: '可坐人数',
    field: 'seatingCapacity',
    component: 'InputNumber',
  },
  {
    label: '车牌',
    field: 'plateNumber',
    component: 'Input',
  },
  {
    label: '司机姓名',
    field: 'driverName',
    component: 'Input',
  },
  {
    label: '司机电话',
    field: 'driverPhone',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '司机等级',
    field: 'driverGrade',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"driver_grade"
     },
    //dynamicDisabled:true
  },
  {
    label: '身份证',
    field: 'card',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}